package com.example.demo.entity.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/***
 ** Create by Wedream on 2021/7/23
 *  为了对应前端数据类型 { name: '北京', value: 25 },
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NameValue implements Comparable<NameValue>{
    private String name;
    private Integer value;

    @Override
    public int compareTo(NameValue o) {
        return this.getValue().compareTo(o.getValue());
    }
}
